﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="TeamStatistics.aspx.cs" Inherits="App.TeamStatistics" Theme="Alpha" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="Panel1" runat="server">
        <h1 class="detailNick">
            <asp:Label ID="LabelTeamName" runat="server" Font-Bold="True"></asp:Label>
        </h1>
       
        <ajaxToolkit:Gravatar ID="ImageAvatar2" runat="server" DefaultImageBehavior="Identicon" CssClass="detailAvatar"/><!-- jenom pro potreby nastylovani -->
        
        <div class="clear"></div>

        <div class="formField" style="margin-top: 20px;">
            <asp:Label ID="lblFrom" runat="server" Text="Od:"></asp:Label>
            <asp:TextBox ID="txtBoxFrom" runat="server" ></asp:TextBox>
            <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtBoxFrom" Format="dd.MM.yyyy" TodaysDateFormat="d, MMMM, yyyy"></ajaxToolkit:CalendarExtender>
        </div>
        <div class="formField">
            <asp:Label ID="lblTo" runat="server" Text="Do:"></asp:Label>
            <asp:TextBox ID="txtBoxTo" runat="server" ></asp:TextBox>
            <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtBoxTo" Format="dd.MM.yyyy" TodaysDateFormat="d, MMMM, yyyy"></ajaxToolkit:CalendarExtender>
        </div>

        <div class="formButton">
          <asp:Button ID="filterButton" runat="server" Text="Nastavit filtr" 
                onclick="filterButton_Click" />
        </div>
       
        <div class="clear"></div>

        <asp:Repeater ID="RepeaterTeamMembers" runat="server">
            <HeaderTemplate>
                <h1 class="detailHeader">Kredit členů týmu:</h1>
                <div class="roleHeader">
                    <span class="first">Kredit</span>
                    <span>Odečteno za akce</span>
                </div>
            </HeaderTemplate>
            <ItemTemplate>
                <div class="creditLine">
                   <ajaxToolkit:Gravatar ID="ImageAvatar1" runat="server" DefaultImageBehavior="Identicon" Email="<%#GetMemberEmail(Container.DataItem)%>" DefaultImage="<%#GetMemberAvatar(Container.DataItem)%>" CssClass="detailTeamAvatar"/><!-- jenom pro potreby nastylovani -->
                   <asp:LinkButton CssClass="nick" ID="LinkButtonUserInfo1" runat="server" CommandArgument="<%#GetLeaderID(Container.DataItem)%>" OnClick="LinkButtonUserInfo_Click" Text="<%#GetMemberNick(Container.DataItem)%>"></asp:LinkButton>
                   <asp:Label ID="lblCredit" runat="server" CssClass="account" style="text-align: center;"><%#GetMemberCredit(Container.DataItem)%> Kč</asp:Label>
                   <asp:Label ID="lblEventCredit" runat="server" CssClass="paid" style="text-align: center;"><%#GetEventCredit(Container.DataItem)%> Kč</asp:Label>
                </div>
            </ItemTemplate>
            <FooterTemplate>
                <div class="creditLine">
                   <span class="nick" style="padding-left: 30px">Celkem:</span>
                   <asp:Label ID="lblCredit" runat="server" CssClass="account" style="text-align: center;"><%#GetMemberCredits()%> Kč</asp:Label>
                   <asp:Label ID="lblEventCredit" runat="server" CssClass="paid" style="text-align: center;"><%#GetEventCredits()%> Kč</asp:Label>
                </div>
            </FooterTemplate>
        </asp:Repeater>

    </asp:Panel>
</asp:Content>
